package com.lsh.airticket.dao;

import com.lsh.airticket.dto.SearchFlight;
import com.lsh.airticket.entity.Flight;
import com.lsh.airticket.entity.FlightInformation;
import org.springframework.stereotype.Repository;

import java.util.List;

/**
 * @author lsh
 * @date 2021/2/15
 **/
@Repository
public interface FlightDao {

    List<Flight> findTbFlightAll();
    // List<HashMap<String, Object>> findFlightInformation();
    List<FlightInformation> findFlightInformation();
    List<FlightInformation> findFlightInformation(SearchFlight searchFlight);

    //根据FlightId 查找 航班信息
    Flight findTbFlightById(String flightId);

    //插入 一个航班信息
    int insertTbFlight(Flight flight);

    // 删除一条数据
    int deleteTbFlightById(String flightId);

    // 更新一条数据
    int updateTbFlight(Flight flight);

}
